﻿// =================================================================== 
// 项目说明
//====================================================================
// 
// 文件： BS_AREA.cs
// 项目名称：


// 创建时间：2013/3/19
// 负责人：
// ===================================================================
using System;
using System.Data;
using CommonLib.Model;
using CommonLib.IDAL;
using CommonLib.DALFactory;
using System.Collections;

namespace CommonLib.BLL
{
    /// <summary>
    ///   的BLL层


    /// </summary>
    public class BS_AREA : BS_AREABLLBase
    {
		#region ----------变量定义----------
		#endregion
		
		#region ----------构造函数----------
		/// <summary>
		/// 默认构造函数


		/// </summary>
		public BS_AREA()
		{
		}
		#endregion
		
		#region----------函数定义---------

        #region	GetList 根据条件得到记录集, 参数：条件，排序

        public static Boolean DeleteTrans(ArrayList list)
        {
            CommonLib.BLL.MyTransaction mytrans = new CommonLib.BLL.MyTransaction();
            try
            {
                mytrans.BeginTransaction();
                for (int i = 0; i <= list.Count - 1; i++)
                {
                    string AREA_ID = list[i].ToString();
                    BS_AREA.DeleteFK(mytrans, "AREA_ID='" + AREA_ID + "'");
                }
                mytrans.CommitTran();
                return true;
            }
            catch (Exception ex)
            {
                string strEx = ex.Message;
                mytrans.RollBackTran();
                return false;
            }
        }
        #endregion

        /// <summary>
        /// 根据条件得到记录集, 参数：条件，排序
        /// </summary>
        /// <param name="sWhere">条件字符串</param>
        /// <param name="sOder">排序字段</param>
        /// <returns>DataSet</returns>
        public static DataSet GetListSub(string sWhere, string sOder)
        {
            // Use the dal to get all records 
            return _dal.GetListSub(sWhere, sOder);
        }
		#endregion
	}
}
